﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/philadmin/Philadmin.Master"
    CodeBehind="ViewHotels.aspx.vb" Inherits="Phila.ViewHotels" %>

<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>
        View Hotels</h1>
    <div class="actions clearfix">
        <div class="floatright">
            <asp:LinkButton ID="btnExport" runat="server" Text="Export to Excel" CssClass="export"></asp:LinkButton></div>
    </div>
    <asp:Label ID="lblMsg" runat="server"></asp:Label>
    <%--<div class="actions">
        <a href="EditHotel.aspx">Add Hotel</a></div>
    <asp:GridView ID="gvHotel" runat="server" ShowHeader="true" ShowFooter="true" AutoGenerateColumns="false"
        Width="100%" CssClass="grid">
        <Columns>
            <asp:BoundField HeaderText="Id" DataField="Id" />
            <asp:BoundField HeaderText="Name" DataField="Name" />
            <asp:BoundField HeaderText="Description" DataField="Description" HtmlEncode="false" />
            <asp:ImageField HeaderText="Image" DataImageUrlField="Thumbnail" DataImageUrlFormatString="~\Images\Img\{0}">
            </asp:ImageField>
            <asp:TemplateField HeaderText="Action">
                <ItemTemplate>
                    <asp:LinkButton ID="edit" runat="server" Text="Edit" CommandName="Edit" />
                    <asp:LinkButton ID="delete" runat="server" Text="Delete" CommandName="Delete" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>--%>
    <radG:RadGrid ID="radGrid" runat="server" Width="99%" PageSize="20" AllowSorting="True"
        Skin="Telerik" AllowPaging="True" ShowGroupPanel="True" AutoGenerateColumns="False"
        GridLines="None" EnableAJAX="True" EnableAJAXLoadingTemplate="True" AllowFilteringByColumn="True">
        <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
        <MasterTableView Width="100%" GroupLoadMode="Client" GroupsDefaultExpanded="False"
            CommandItemDisplay="Top" DataKeyNames="ID">
            <CommandItemTemplate>
                <table width="100%" border="0">
                    <tr>
                        <td valign="top" align="right">
                            <a href="EditHotel.aspx">
                                <img src="../RadControls/Grid/Skins/AddRecord.gif" align="absmiddle" />Add New</a>
                        </td>
                    </tr>
                </table>
            </CommandItemTemplate>
            <%--<GroupByExpressions>
                            <radG:GridGroupByExpression>
                                <SelectFields>
                                    <radG:GridGroupByField FieldAlias="City" FieldName="City" HeaderText="City" />
                                </SelectFields>
                                <GroupByFields>
                                    <radG:GridGroupByField FieldAlias="City" FieldName="City" HeaderText="City" />
                                </GroupByFields>
                            </radG:GridGroupByExpression>
                        </GroupByExpressions>--%>
            <RowIndicatorColumn Visible="False">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="False">
                <HeaderStyle Width="19px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <radG:GridTemplateColumn AllowFiltering="False" Groupable="false" UniqueName="TemplateEditColumn"
                    HeaderText="Edit">
                    <ItemTemplate>
                        <a href="EditHotel.aspx?hid=<%#DataBinder.Eval(Container.DataItem,"ID")%>">
                            <img src="../RadControls/Grid/Skins/Edit.gif" alt="Edit" title="Edit" style="border: 0px;" />
                        </a>
                    </ItemTemplate>
                    <HeaderStyle Width="50px" />
                </radG:GridTemplateColumn>
                <radG:GridBoundColumn SortExpression="Name" HeaderText="Name" HeaderButtonType="TextButton"
                    DataField="Name">
                    <HeaderStyle Width="250px" />
                </radG:GridBoundColumn>
                <radG:GridTemplateColumn AllowFiltering="False" Groupable="false" HeaderText="Hotel Category">
                    <ItemTemplate>
                        <img src="images/img/<%#DataBinder.Eval(Container.DataItem,"CategoryId")%>star.gif"
                            border="0" />
                    </ItemTemplate>
                </radG:GridTemplateColumn>
                <radG:GridBoundColumn SortExpression="Address" HeaderText="Address" HeaderButtonType="TextButton"
                    DataField="Address">
                </radG:GridBoundColumn>
                <radG:GridBoundColumn SortExpression="Phone" HeaderText="Phone" HeaderButtonType="TextButton"
                    DataField="Phone">
                </radG:GridBoundColumn>
                <radG:GridBoundColumn SortExpression="Email" HeaderText="Email" HeaderButtonType="TextButton"
                    DataField="Email">
                    <HeaderStyle Width="100px" />
                </radG:GridBoundColumn>
                <radG:GridBoundColumn SortExpression="Person" HeaderText="Person" HeaderButtonType="TextButton"
                    DataField="Person">
                    <HeaderStyle Width="100px" />
                </radG:GridBoundColumn>
                <radG:GridTemplateColumn AllowFiltering="False" Groupable="false" HeaderText="IsActive">
                    <ItemTemplate>
                        <asp:CheckBox ID="chk" runat="server" Checked='<%#DataBinder.Eval(Container.DataItem,"IsActive")%>'
                            Enabled="false" />
                    </ItemTemplate>
                    <HeaderStyle Width="50px" />
                </radG:GridTemplateColumn>
                <radG:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete"
                    ButtonType="ImageButton" ImageUrl="../RadControls/Grid/Skins/Delete.gif" ConfirmText="Are you sure you want to delete this record?">
                    <HeaderStyle Width="30px" />
                </radG:GridButtonColumn>
            </Columns>
        </MasterTableView>
    </radG:RadGrid>
    <div style="display: none">
        <radG:RadGrid ID="radGridExport" runat="server" Width="99%" AllowMultiRowSelection="False"
            Skin="Telerik" AllowPaging="false" ShowGroupPanel="false" AutoGenerateColumns="False"
            GridLines="None" EnableAJAX="true" EnableAJAXLoadingTemplate="true">
            <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
            <MasterTableView Width="100%" GroupLoadMode="Client" GroupsDefaultExpanded="False"
                CommandItemDisplay="Top" DataKeyNames="ID">
                <CommandItemTemplate>
                </CommandItemTemplate>
                <Columns>
                    <radG:GridBoundColumn SortExpression="Name" HeaderText="Name" HeaderButtonType="TextButton"
                        DataField="Name">
                    </radG:GridBoundColumn>
                    <radG:GridBoundColumn SortExpression="CategoryId" HeaderText="CategoryId" HeaderButtonType="TextButton"
                        DataField="CategoryId">
                    </radG:GridBoundColumn>
                    <radG:GridBoundColumn SortExpression="Address" HeaderText="Address" HeaderButtonType="TextButton"
                        DataField="Address">
                    </radG:GridBoundColumn>
                    <radG:GridBoundColumn SortExpression="Phone" HeaderText="Phone" HeaderButtonType="TextButton"
                        DataField="Phone">
                    </radG:GridBoundColumn>
                    <radG:GridBoundColumn SortExpression="Email" HeaderText="Email" HeaderButtonType="TextButton"
                        DataField="Email">
                    </radG:GridBoundColumn>
                    <radG:GridBoundColumn SortExpression="Person" HeaderText="Person" HeaderButtonType="TextButton"
                        DataField="Person">
                    </radG:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </radG:RadGrid></div>
</asp:Content>
